using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace RBAC.Domain.ProcessManagement
{
    /// <summary>
    /// 工序附件表（与工序一对多）
    /// </summary>
    [Table("ProcessAttachment")]
    public class ProcessAttachment : BaseEntity
    {
        /// <summary>
        /// 工序主表ID（外键，仅存Id）
        /// </summary>
        public long ProcessId { get; set; }

        /// <summary>
        /// 原始文件名
        /// </summary>
        public string? FileName { get; set; }

        /// <summary>
        /// 文件访问地址（或相对路径）
        /// </summary>
        public string? FileUrl { get; set; }

        /// <summary>
        /// 文件大小（字节）
        /// </summary>
        public long? FileSize { get; set; }

        /// <summary>
        /// 文件内容类型（MIME），如 application/pdf
        /// </summary>
        public string? ContentType { get; set; }

        /// <summary>
        /// 文件哈希（MD5/SHA1 等），用于去重/校验
        /// </summary>
        public string? FileHash { get; set; }

        /// <summary>
        /// 上传时间
        /// </summary>
        public DateTime? UploadTime { get; set; }

        /// <summary>
        /// 上传人Id
        /// </summary>
        public long? UploaderId { get; set; }

        /// <summary>
        /// 上传人名称
        /// </summary>
        public string? UploaderName { get; set; }

        /// <summary>
        /// 状态（1=有效，0=无效/删除）
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
    }
}
